Is there any difference using {} pair or () pair when define function-like macro in C?

Posted by solotim on Stack Overflow See other posts from Stack Overflow or by solotim
Published on 2010-04-26T09:08:56Z Indexed on 2010/04/26 9:13 UTC
Read the original article Hit count: 107

Filed under:
|

For example:

#define FOO(x)     (printf(x))

and

#define FOO(x)     {printf(x)}

It seems that both are viable for preprocessing, but which is better?

© Stack Overflow or respective owner

Related posts about c

    Related posts about preprocessing